package com.ruoyi.message.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.message.mapper.GroupUserIdMapper;
import com.ruoyi.message.domain.GroupUserId;
import com.ruoyi.message.service.IGroupUserIdService;

/**
 * 群成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-19
 */
@Service
public class GroupUserIdServiceImpl implements IGroupUserIdService 
{
    @Autowired
    private GroupUserIdMapper groupUserIdMapper;

    /**
     * 查询群成员
     * 
     * @param groupId 群成员主键
     * @return 群成员
     */
    @Override
    public GroupUserId selectGroupUserIdByGroupId(Long groupId)
    {
        return groupUserIdMapper.selectGroupUserIdByGroupId(groupId);
    }

    /**
     * 查询群成员列表
     * 
     * @param groupUserId 群成员
     * @return 群成员
     */
    @Override
    public List<GroupUserId> selectGroupUserIdList(GroupUserId groupUserId)
    {
        return groupUserIdMapper.selectGroupUserIdList(groupUserId);
    }
    @Override
    public List<GroupUserId> selectGroupUserIdListByuserId(GroupUserId groupUserId)
    {
        return groupUserIdMapper.selectGroupUserIdListByuserId(groupUserId);
    }

    /**
     * 新增群成员
     * 
     * @param groupUserId 群成员
     * @return 结果
     */
    @Override
    public int insertGroupUserId(GroupUserId groupUserId)
    {
        return groupUserIdMapper.insertGroupUserId(groupUserId);
    }

    /**
     * 修改群成员
     * 
     * @param groupUserId 群成员
     * @return 结果
     */
    @Override
    public int updateGroupUserId(GroupUserId groupUserId)
    {
        return groupUserIdMapper.updateGroupUserId(groupUserId);
    }

    /**
     * 批量删除群成员
     * 
     * @param groupIds 需要删除的群成员主键
     * @return 结果
     */
    @Override
    public int deleteGroupUserIdByGroupIds(Long[] groupIds)
    {
        return groupUserIdMapper.deleteGroupUserIdByGroupIds(groupIds);
    }


    /**
     * 删除群成员信息
     * 
     * @param groupId 群成员主键
     * @return 结果
     */
    @Override
    public int deleteGroupUserIdByGroupId(Long groupId)
    {
        return groupUserIdMapper.deleteGroupUserIdByGroupId(groupId);
    }
}
